/*
 * marketsim-eclipsetrader
 *
 * Copyright (C) 2008-2011 Steve Phelps and John Cartlidge
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 3 of
 * the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU General Public License for more details.
 */
/*
 *  (C) Victria Ltd. 2007
 */
package victria.marketsim.ordertype;

import java.util.LinkedList;
import java.util.List;

import victria.marketsim.core.Order;

/**
 * Combined order type.  Default settings are applied in-order.
 * 
 * @author sphelps
 *
 */
public class CombinedOrderType implements OrderType {

	protected List<OrderType> types;
	
	public CombinedOrderType(List<OrderType> types) {
		this.types = types;
	}
	
	public CombinedOrderType() {
		this(new LinkedList<OrderType>());
	}

	public void setDefaultValues(Order currentOrder) {
		for(OrderType type : types) {
			type.setDefaultValues(currentOrder);
		}
	}

	public List<OrderType> getTypes() {
		return types;
	}

	public void setTypes(List<OrderType> types) {
		this.types = types;
	}

	
	
}
